package com.jinghua.treatment.controller;

import com.jinghua.treatment.entity.SysFeel;
import com.jinghua.treatment.service.SysFeelService;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * 身体感觉情况控制器
 * Created by 王兴光 on 2018/3/26.
 */
@Controller
@RequestMapping("/feel")
public class SysFeelController {

    @Resource
    private SysFeelService feelService;

    @ApiOperation(value="根据身体情况编号查询身体情况信息")
    @GetMapping(value="/getFeelById",params = {"feelId"})
    @ResponseBody
    public SysFeel findFeelById(Integer feelId){return feelService.selectByPrimaryKey(feelId);};

    @ApiOperation(value="新增身体情况信息")
    @GetMapping(value="/insertFeel")
    @ResponseBody
    public int insertFeel(SysFeel feel){return feelService.insert(feel);};

    @ApiOperation(value="更新身体情况信息")
    @GetMapping(value="/updateFeel")
    @ResponseBody
    public int updateFeel(SysFeel feel){return feelService.updateByPrimaryKey(feel);};
}
